Microsoft DirectX 8.1 (C++)

DirectDraw Exclusive Mode

This topic applies to Windows XP Home Edition and Windows XP Professional only.

In DirectDraw Exclusive Mode, an application takes exclusive control of the graphics hardware. This is useful for applications such as games, or perhaps full-screen video applications. Normally, the VMR itself creates the DirectDraw objects and sets the cooperative level to normal. To run the VMR in DirectDraw Exclusive Mode, the application itself must create the DirectDraw object and the primary surface and call SetCooperativeLevel to specify exclusive mode. The VMR has a special allocator-presenter that enables it to run in DirectDraw Exclusive Mode. To configure the VMR to use this allocator-presenter:

  1. Create the Filter Graph and add the VMR to it using the IFilterGraph::AddFilter method. For a code example, see Configuring For Windowless Mode.
  2. Create the Exclusive Mode Allocator-Presenter:
IVMRImagePresenterExclModeConfig* pExclModeConfig;
CoCreateInstance(
        CLSID_AllocPresenterDDXclMode,
        NULL,
        CLSCTX_INPROC_SERVER,
        IID_IVMRImagePresenterExclModeConfig,
        (void**)&pIVMRImagePresenterExclModeConfig
        );
  1. Configure the new Allocator-Presenter:
pIVMRImagePresenterExclModeConfig->SetXlcModeDDObjAndPrimarySurface(�);
  1. Plug the new Allocator-Presenter into the VMR.
  2. Build the rest of the filter graph in the usual ways.